﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DA;

namespace BL
{
    public class OrdersRepository : OrderDeskEntityRepository<DA.Order>
    {
        protected override System.Linq.Expressions.Expression<Func<Order, bool>> FilterByClientId(int clientId)
        {
            return x => x.ClientId == clientId;
        }

        public override Order Create(Order entity, bool saveChanges = true)
        {
            entity.CreationDate = DateTime.Now;

            return base.Create(entity, saveChanges);
        }
    }
}
